package com.simple.crawler;

import com.simple.crawler.annotation.Aop;
import com.simple.crawler.core.Task;
import com.simple.crawler.core.listener.CrawlerEngineActuator;

/**
 * 爬虫引擎
 */
@Aop(callback = CrawlerEngineActuator.class)
public class CrawlerEngine {

    /**
     * 部署爬虫
     * @param pkg
     * @return
     */
    public CrawlerEngine deploy(Object pkg) {
        return this;
    }

    /**
     *
     * @param url
     * @param taskList
     * @return
     */
    public CrawlerEngine deploy(String url, Class<? extends Task>... taskList) {
        return this;
    }

    /**
     * 执行爬虫
     * @return
     */
    public CrawlerEngine start() {
        return this;
    }

    /**
     * 暂停爬虫
     * @return
     */
    public CrawlerEngine pause() {
        return this;
    }

    /**
     * 停止爬虫
     * @return
     */
    public CrawlerEngine stop() {
        return this;
    }

}
